The effect framework is one approach to writing effects components. It has been designed to provide most of the basic code required to implement an effect component, leaving the implementation of the effect algorithm to you. It should be possible to write most effects using the framework, though you may need to adapt the framework code for more complex effect components.
The framework implements the required component functions for an effect. The main body of the framework is the Effect.c file, which contains the source code for the framework and an implementation of the dimmer effect. This file is made up of four main parts:
All the function and data structure names in the framework are arbitrary. The names have been chosen to reflect their purpose, but you are free to change the names, as long as they remain internally consistent.
If you choose to change the names of the component functions, you will have to change the CALLCOMPONENT_BASENAME #define in Effect.c . This defines the root of the name used for component functions. For example, if CALLCOMPONENT_BASENAME is set to SlideEffect , then the Open component function must be called SlideEffectOpen , the Close component function must be called SlideEffectClose , and so forth.
Apple recommends that you do not change the names used in the framework.
| Previous | Chapter Contents | Chapter Top | Next |